package com.example.live.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.image.glide.GlideImgLoader
import com.example.live.R
import com.example.live.entity.GoodsEntity

class GoodsAdapter :BaseQuickAdapter<GoodsEntity, BaseViewHolder>(R.layout.item_shop) {
    override fun convert(holder: BaseViewHolder, item: GoodsEntity) {

        holder.setText(R.id.shop_number,item.id.toString())
        holder.setText(R.id.shop_desc,item.goods_attribute)
        holder.setText(R.id.shop_title,item.goods_desc)
        holder.setText(R.id.shop_price,"￥${item.goods_default_price}")
        GlideImgLoader.loadImage(context,item.goods_default_icon,holder.getView(R.id.shop_icon))
    }
}